Integrand size = 31, antiderivative size = 196 \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x)) (A+B \cos (e+f x)) \, dx=\frac {b B (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (2+m)}-\frac {(b B (1+m)+a A (2+m)) (c \cos (e+f x))^{1+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{c f (1+m) (2+m) \sqrt {\sin ^2(e+f x)}}-\frac {(A b+a B) (c \cos (e+f x))^{2+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{c^2 f (2+m) \sqrt {\sin ^2(e+f x)}} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {3047, 3102, 2827, 2722} \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x)) (A+B \cos (e+f x)) \, dx=-\frac {(a B+A b) \sin (e+f x) (c \cos (e+f x))^{m+2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(e+f x)\right )}{c^2 f (m+2) \sqrt {\sin ^2(e+f x)}}-\frac {\sin (e+f x) (a A (m+2)+b B (m+1)) (c \cos (e+f x))^{m+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(e+f x)\right )}{c f (m+1) (m+2) \sqrt {\sin ^2(e+f x)}}+\frac {b B \sin (e+f x) (c \cos (e+f x))^{m+1}}{c f (m+2)} \]
[In]
[Out]
Rule 2722
Rule 2827
Rule 3047
Rule 3102
Rubi steps \begin{align*} \text {integral}& = \int (c \cos (e+f x))^m \left (a A+(A b+a B) \cos (e+f x)+b B \cos ^2(e+f x)\right ) \, dx \\ & = \frac {b B (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (2+m)}+\frac {\int (c \cos (e+f x))^m (c (b B (1+m)+a A (2+m))+(A b+a B) c (2+m) \cos (e+f x)) \, dx}{c (2+m)} \\ & = \frac {b B (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (2+m)}+\frac {(A b+a B) \int (c \cos (e+f x))^{1+m} \, dx}{c}+\left (a A+\frac {b B (1+m)}{2+m}\right ) \int (c \cos (e+f x))^m \, dx \\ & = \frac {b B (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (2+m)}-\frac {\left (a A+\frac {b B (1+m)}{2+m}\right ) (c \cos (e+f x))^{1+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{c f (1+m) \sqrt {\sin ^2(e+f x)}}-\frac {(A b+a B) (c \cos (e+f x))^{2+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{c^2 f (2+m) \sqrt {\sin ^2(e+f x)}} \\ \end{align*}
Time = 0.54 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.83 \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x)) (A+B \cos (e+f x)) \, dx=-\frac {(c \cos (e+f x))^m \left ((b B (1+m)+a A (2+m)) \cot (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(e+f x)\right ) \sqrt {\sin ^2(e+f x)}+(A b+a B) (1+m) \cos (e+f x) \cot (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(e+f x)\right ) \sqrt {\sin ^2(e+f x)}-\frac {1}{2} b B (1+m) \sin (2 (e+f x))\right )}{f (1+m) (2+m)} \]
[In]
[Out]
\[\int \left (c \cos \left (f x +e \right )\right )^{m} \left (a +b \cos \left (f x +e \right )\right ) \left (A +\cos \left (f x +e \right ) B \right )d x\]
[In]
[Out]
\[ \int (c \cos (e+f x))^m (a+b \cos (e+f x)) (A+B \cos (e+f x)) \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )} \left (c \cos \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
\[ \int (c \cos (e+f x))^m (a+b \cos (e+f x)) (A+B \cos (e+f x)) \, dx=\int \left (c \cos {\left (e + f x \right )}\right )^{m} \left (A + B \cos {\left (e + f x \right )}\right ) \left (a + b \cos {\left (e + f x \right )}\right )\, dx \]
[In]
[Out]
\[ \int (c \cos (e+f x))^m (a+b \cos (e+f x)) (A+B \cos (e+f x)) \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )} \left (c \cos \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
\[ \int (c \cos (e+f x))^m (a+b \cos (e+f x)) (A+B \cos (e+f x)) \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )} \left (c \cos \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x)) (A+B \cos (e+f x)) \, dx=\int {\left (c\,\cos \left (e+f\,x\right )\right )}^m\,\left (A+B\,\cos \left (e+f\,x\right )\right )\,\left (a+b\,\cos \left (e+f\,x\right )\right ) \,d x \]
[In]
[Out]